Color quantization and similarity measure for content based image retrieval

ABSTRACT

The invention determines the degree of similarity between a target image and each of a plurality of reference images. The measure used for the degree of similarity between images is based on the human perceptive system, so that images that appear to a human to be similar in color have a higher similarity measure than images that appear to a human to be dissimilar in color. Each of the most populous colors of each partition of the target image is associated with a color in a corresponding partition of the reference image that is closest to the target image color. The similarity measure is based on the number of occurrences of each of these associated colors in the corresponding partitions, as well as the color difference between these associated colors. Thus, images that have similar, albeit not identical, colors, will have a higher similarity measure than images that have dissimilar colors. In a preferred embodiment, color difference is determined based upon the CIE luminance-chrominance color space. Also, in a preferred embodiment, the target image color is quantized into a set of discrete colors that are based upon the predominant colors in the reference images.

CROSS REFERENCE TO RELATED APPLICATIONS

[0001] This is a Divisional of application Ser. No. 09/110,613, filedJul. 6, 1998.

FIELD OF THE INVENTION

[0002] This invention relates in general to the field of computers, andin particular to image retrieval from large image databases, such asphotographic archives, digital libraries, catalogs, and videos.

BACKGROUND OF THE INVENTION

[0003] Various techniques are commonly employed for retrieving imagesstored in a database. The most conventional technique for storing andretrieving images that match a desired characteristic is to associatekey words with each image, such as “portrait”, “seascape”, “mountain”,“presidents”, etc. Having associated such key words to the images, auser provides one or more search words to the search or retrievalsystem, and the system presents one or more images in dependence uponthe degree of correspondence between the search words and stored keywords. Conventional Internet search engines are examples of such textbased retrieval means.

[0004] Text based image retrieval, however, requires the categorizing ofeach picture by keywords, which can be a burdensome process if appliedto hundreds or thousands of images; also, the individual choice ofkeywords limits the effectiveness of the search to the degree ofcorrespondence between the words the categorizer used to describe thestored images, and the words the searcher uses to describe the desiredimage.

[0005] Graphics based retrieval is a more intuitive approach to imageretrieval. Conventional graphic based retrieval systems employ variousforms of color or pattern matching. A graphics based system, however,can be computationally intensive. Computer images are typically storedas an array of thousands of pixels, and the color of each of thethousands of pixels is encoded as a 24-bit red-green-blue (RGB) value.The comparison of a target image to a collection of reference imagesbased on these thousands of 24-bit values is computationallyimpractical, and a pixel-by-pixel comparison may not provide a measureof similarity that correlates to the human visual system. Practicalgraphics based systems, therefore, characterize an image based on anabstraction of the image, and the comparisons among images are based onthe abstractions. The conventional abstractions include a partitioningof the image into an array of partitions, wherein the number ofpartitions is substantially less than the number of pixels in the image.Comparisons among images are based on a comparison of each correspondingpartition in the images, rather than a comparison of each correspondingpixel in the images.

[0006] The conventional abstractions also include a quantization of thecolor value into a smaller, less precise, color value. For example, a24-bit RGB value may be quantized to one of 64 common colors, forexample, the 64 colors that might be contained in a box of 64 crayons.Such an abstraction retains the substantial color qualities of theimage, but uses only 6-bits per pixel, rather than 24. Using thisquantization, the characteristics of a partition of an image are encodedas a histogram of the number of occurrences of pixels of each quantizedcolor value within the partition.

[0007] A comparison of the histograms representing the colors in eachpartition in the images can provide for a measure of similarity betweenimages. Histograms are, however, by their very nature, multidimensional.A comparison between two histograms is multidimensional and does notdirectly provide for a single valued measure of similarity. Conventionalstatistical methods of comparing the number of occurrences of events,based, for example on a chi-square test, can be used to comparehistograms. Conventional methods used to compare histograms, however, donot take into account the sensitivities of the human perception system.For example, of the 64 quantized colors discussed above, multiple shadesof green may be provided, including “ivy” and “emerald”. One image maycontain a substantial number of occurrences of the quantized “ivy”color, whereas another image may contain a substantial number ofoccurrences of the quantized “emerald” color. A conventional histogramcomparator would not necessarily determine a similarity between theseimages, because they contain “different” colors. Reducing the number ofquantization levels, for example to the six primary colors plus blackand white, eliminates this problem by quantizing all shades of green tothe same “green” value. Such a reduction, however, will preclude anability to identify a stronger similarity between images that do, infact, have corresponding shades of color, such as “ivy” or “emerald”.

[0008] The conventional method of quantizing colors also uses an apriori determination of the quantization levels. Choosing the 64 colorsof a common box of crayons may provide for an effective quantizationscheme for images in general, but it may not be suitable for alldatabase collections. For example, if the image database is a databaseof portraits, having multiple shades of green or violet colors would notprovide the same distinguishing capabilities as having varying shades ofhair and flesh colors.

[0009] Therefore, a need exists for a method and apparatus that providesa similarity measure between images that is based on the humanperceptive system. A need also exists for a method and apparatus thatprovides for a comparison between images that is based on the expectedcolor content of the images.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010]FIG. 1 illustrates an example block diagram of an image comparisonsystem in accordance with this invention.

[0011]FIG. 2 illustrates an example block diagram of a characterizer tofacilitate the characterization of an image in accordance with thisinvention.

[0012]FIG. 3 illustrates an example block diagram of a characteristicscomparator to facilitate the comparison of images in accordance withthis invention.

[0013]FIG. 4 illustrates an example flowchart for comparing imagecharacteristics in accordance with this invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0014] In general, the invention provides for a method and apparatus fordetermining a degree of similarity between a target image and each of aplurality of reference images. The measure used for the degree ofsimilarity between images is based on the human perceptive system, sothat images that appear to a human to be similar in color have a highersimilarity measure than images that appear to a human to be dissimilarin color. Each of the most populous colors of each partition of thetarget image is associated with a color in a corresponding partition ofthe reference image that is closest to the target image color. Thesimilarity measure is based on the number of occurrences of each ofthese associated colors in the corresponding partitions, as well as thecolor difference between these associated colors. Thus, images that havesimilar, albeit not identical, colors will have a higher similaritymeasure than images that have dissimilar colors. In a preferredembodiment, color difference is determined based upon the CIEluminance-chrominance color space. Also, in a preferred embodiment, thetarget image color is quantized into a set of discrete colors that arebased upon the predominant colors in the reference images.

[0015]FIG. 1 illustrates an example image comparison system inaccordance with this invention. The image comparison system of FIG. 1includes a characterizer 120 that characterizes images 101, 111 intoimage characteristics 102, 112, and a search engine 150 that locates asubset 151 of the images 111 that are similar to image 101, based uponthe image characteristics 102, 112. As shown in FIG. 1, reference images111 are located in a reference image database 110. This database may bea collection of bitmaps, JPEG images, MPEG videos, and the like. As iscommon in the art, the database may be local or remote, unified ordistributed, homogeneous or non-homogeneous. For example, the databasemay be an encoding of all the portraits in a particular museum that isstored at the museum's web site on the world-wide-web. Or, it may be allthe works of artists of a certain period, stored at multiple sites onthe worldwide-web. Or, it may be a particular user's collection ofimages of automobiles, stored on disks at the user's site.

[0016] In operation, a user of the image comparison system of FIG. 1provides a target image 101 to the system, and the system thereafterprovides a list 171 of those images 111 in the database 110 that aremost similar to the target image 101. The characterizer 120characterizes the target image 101 into target image characteristics102. The characterizer 120 also characterizes each reference image 111into reference image characteristics 112, for comparison with the targetimage characteristics 102. For efficiency, the reference images 111 inthe reference image database 110 are characterized by the characterizer120 once, and stored in a reference image characteristics database 140.In this manner, alternative target images 101 can be submitted forcharacterizing and searching without requiring all the reference images111 of the reference image database to be characterized again.

[0017] The search engine 150 includes a characteristics comparator 160that compares the target image characteristics 102 with each referenceimage characteristics 112 from the reference image characteristicsdatabase 140 and produces a similarity measure 161 for each referenceimage characteristics 112. Associated with each reference imagecharacteristics 112 is an identifier to its corresponding referenceimage 111 in the reference image database 110. The sorter 170 sorts theidentifiers to the reference images 111, based on the similarity measure161, and provides a sorted list of identifiers 171 to a display 190.Alternative, the sorted list is provided to a selector 180 that selectsthe images 111 corresponding to the list of identifiers 171, andprovides a sorted subset 151 of the images 111 to the display 190. Thatis, the user will be provided a list or display of the images 111 in thedatabase 110 that are most similar to the target image 101.

[0018] Also illustrated in FIG. 1 is an optional quantizationdeterminator 130. In a preferred embodiment of this invention, the colorquantization levels 131 are determined based upon one or morerepresentative images in the reference image database 110. The colors ofthe representative images are used to determine a set of color centers,each color center being a centroid of a subset of the colors that arewithin the representative images. Any number of techniques may be usedto determine an appropriate set of color centers. For example, if 64quantization levels are desired, the 64 color centers could be definedas the colors of the 64 most populous pixel colors in the representativeimages. In the quantization process, a pixel's quantized value will bethe value of its nearest color center. The difference between a pixel'sactual value and the pixel's quantized value is termed a quantizationerror. To further refine the choice of color centers, the color centerscan be determined as the 64 pixel colors that result in a minimumoverall quantization error, using for example, least squaresminimization techniques common in the art. By determining color centersthat are based on the actual color values that are contained in therepresentative images, the color resolution of the characterizationprocess in the characterizer 120 is thereby dynamically adjusted todistinguish among shades of the prevalent colors in the representativeimages. For example, if the representative images contain many brownregions, and few green regions, more color centers will be associatedwith shades of brown than with shades of green. Thereafter, a finerdistinction of shades of brown will be used by the characterizer 120 tocharacterize the target image 101 and the reference images 111, andreference images 111 having similar shades of brown to the target image101 will have a higher similarity measure 161 than reference images 111having dissimilar shades of brown. Conversely, a reference image 111having a different shade of green from the target image 101 may producethe same similarity measure 161 as another reference image 111 that hasthe exact shade of green as the target image 101, because there may beonly one color center associated with all shades of green.

[0019] A preferred embodiment of this invention utilizes a colorencoding that provides a characterization that reflects the human visualperception system. That is, the encoding is such that colors that appearto be similar in the human visual system have a small color difference,or distance, between them in this encoding, and colors that appear to bedissimilar to the human visual system have a large color difference. TheEuclidean distance between two colors in the conventional RGB encodingspace does not truly reflect the difference perceived by the humanvisual system. The Commission Internationale de l'Eclairage (CIE) hasrecommended two color space encodings that have a high correlation tothe perceptions of the human visual system: CIELUV and CIELAB. In thepreferred embodiment, the CIELUV encoding, which uses a measure ofluminance (L) and two measures of chrominance (U, V) of the image, isused. The translation from one color space to another is known to one ofordinary skill in the art, as are the means of converting from variousimage encoding formats, such as JPEG, MPEG, NTSC, PAL, and the like. Ifthe encoding of the target image or an image in the data base does notreflect the perceived differences between colors in the human visualsystem, the characterizer 120 and quantization determinator 130 includethe appropriate translation means to encode the image into an encodingthat has a high correlation to the human visual system.

[0020]FIG. 2 illustrates an example block diagram of the characterizer140 that characterizes an image 201 to produce an image characteristic202. The characterizer 140 includes a partitioner 210, a quantizer 220,and an accumulator 230. The characterizer 140 also includes an optionaltranslator 280 for translating the encoding of the image as discussedabove. The partitioner 210 partitions the image into an array ofpartitions. The number of partitions is somewhat subjective. The levelof detail of the image characteristics 202 will be dependent upon thenumber of partitions. A large number of partitions provides for a highlevel of detail in the characteristics and subsequent comparisonprocesses, but at the cost of processing time. It may also result inerroneous similarity determinations, when, for example, the images aredissimilar at a fine level of detail, but similar at a gross level ofdetail. Alternatively, a small number of partitions will consume lessprocessing time, but may result in large numbers of reference imagesproducing similar similarity measures 161, obviating the intendedpurpose of the image comparison system of separating the similar fromthe dissimilar. In a preferred embodiment, the image is partitioned intoan array of 4×4, 8×8, or 16×16 partitions.

[0021] The quantizer 220 determines the color center, or quantizationlevel 131 that is closest to each pixel's image color. In this manner,the range of possible colors is reduced from the full range of imagecolor encodings to the range of quantized colors. Based on this reducedrange of quantized colors, the accumulator 230 determines the number ofoccurrences of each of the quantized colors within each partition of theimage 201. In a preferred embodiment, the accumulator 230 provides anormalized histogram of the proportion of occurrences of each quantizedcolor in each partition.

[0022] Each reference image 111 of the reference image database 110 isprocessed by the characterizer 120 to produce the reference imagecharacteristics 112 representing the proportion of occurrences of eachquantized color in each partition of the reference image 111. This samecharacterization is used to characterize the target image 101 to producethe target image characteristics 102, and thereafter the comparison ofthe target image to the reference images is effected by the comparisonof the proportion of occurrences of the quantized colors in each of theimages.

[0023]FIG. 3 illustrates a block diagram of an example characteristicscomparator 160 to facilitate the comparison of proportions ofoccurrences of quantized colors between two images, Image1 and Image2.The characteristics comparator 160 includes a similar color determinator320, a similarity determinator 330, and an accumulator 340. Thecharacteristic comparator compares each partition 302 of Image1 301 witha corresponding partition 312 of Image2 311. A predetermined number D ofthe quantized colors having the highest proportion of occurrences areused for determining color similarity between the two partitions 302,312. In a typical embodiment, D is between 4 and 16. Each of the Dquantized colors of partition 302 is matched with one of D quantizedcolors of partition 312. The similar color determinator 320 determinesthe color distance 322 between each quantized color of partition 302 andeach of the quantized colors of partition 312. The closest quantizedcolor of partition 312 is paired with the quantized color of partition302 under consideration. This similarity pairing is communicated to thesimilarity determinator 330 as a similar color pair 321. The similarcolor pair 321 includes the proportions of the corresponding quantizedpaired colors in each partition 302, 312. The corresponding colordistance 322 between each of the quantized colors of the color pair 321is also communicated to the similarity determinator 330, to avoid havingto recompute the color distance.

[0024] The similarity determinator 330 computes a partition similaritymeasure 331 that is a composite of a comparison of the proportion of thequantized colors in each similar color pair 321, as well as the degreeto which the quantized colors are similar, based on the color distance322. In a preferred embodiment, the measure used for the comparison isdirectly proportional to the sum of the proportions of the pairedcolors, and inversely proportional to the difference between theproportions of the paired colors and inversely proportional to thedifference between the color values of the paired colors. That is, thesimilarity measure 331 is based on the number of occurrences of similarcolors in each image, and weighted by the degree of similarity betweenthe similar colors. Consider, for example, an image that is similar toanother in content, but contains different colors, for examplephotographs of a seascape at different times of the day. The images willexhibit a high correlation between the number of occurrences of similarcolors, and will produce a high sum of proportions and a low differenceof proportions, and therefore a high similarity measure based onproportions of similar colors. The overall similarity measure will beattenuated by the difference between the shades of similar colorsproduced by the differing times of day, as would be consistent with ahuman's assessment of the similarity of such photographs of a seascapes.

[0025] The accumulator 340 accumulates the similarity measure 331 ofeach partition of the images to provide the image similarity measure161. If Image1 is the target image, and Image2 is a sequence ofreference images, the resultant sequence of image similarity measures161 provide for a measure of similarity between the target image andeach of the reference images. This sequence of similarity measures 161,and an identifier to the reference image associated with each similaritymeasure 161, are provided to the sorter 170 that displays a list of theimages that are most similar to the target image.

[0026] It should be noted that the aforementioned image comparisontechnique is not necessarily commutative, in that a different similaritymeasure may result, depending upon which of the two images are used asImage1 and Image2 respectively. At option, to provide for mathematicalconsistency and symmetry, the assignment of the target image orreference image to Image1 or Image2 is dynamic for each partition. Thepartition that is provided to the characteristics comparator 160 asImage1 is the partition that has the highest cumulative proportions ofthe D quantized colors. That is, for example, if the D most populousquantized colors of the partition of the target image account for 90percent of the colors in the partition, and the D most populousquantized colors of the partition of the reference image account for 85percent of the colors in the partition, the partition of the targetimage is provided to the characteristics comparator 160 as Image1. Ifthe cumulative proportions of the D quantized colors in both the targetand reference images are equal, the partition similarity measure 331 iscomputed twice, the target and reference partitions being interchanged,and the higher similarity measure 331 of the two is provided to theaccumulator 340.

[0027]FIG. 4 illustrates an example flowchart for comparing imagecharacteristics, as may be implemented in a characteristics comparator160 in accordance with this invention. The characteristics of the targetimage are determined at 400. The characteristics of each reference imageare compared to the target image characteristics in the loop 410-419.The similarity measure associated with each image comparison isinitialize to zero, at 412. Each partition within each reference imageis compared to a corresponding partition of the target image in the loop420-429. At 422, the partition that has the highest cumulativeproportion of the D most populous quantized colors in the partition isdetermined, as discussed above. For convenience, the target or referencepartition that is determined at 422 to have the highest cumulativeproportions is termed the large partition, L, and the remainingreference or target partition is termed the small partition S. For eachof the D colors in the large partition L, a comparison is made to themost similar color in the small partition S in the loop 430-439. Thecolor in the small partition S that is closest to the color in the largepartition L is defined to be the most similar color to the color in thelarge partition L. This most similar color is determined at 432. Thesimilarity measure resulting from this determination is computed at434-436. At 434, the difference between the color in the large partitionL and the most similar color in the small partition S is computed asColDiff. The double-bar symbol “∥” is used to indicate that thecomputation of the difference between colors is not necessarily anarithmetic subtraction, because the color is encoded as amultidimensional value, for example, a value composed of luminance andchrominance component values, as in a CIELUV encoding. The method ofcomputing a difference between colors is determined by the colorencoding method selected, and known to one of ordinary skill in the art.Also at 434, the sum and the difference of the proportions of the colorin the large partition L and the most similar color in the smallpartition S is computed as SumP and DiffP, respectively. At 436, thesimilarity measure associated with the color in the large partition Land the most similar color in the small partition S is computed as SumPdivided by an offset sum of DiffP and ColDiff. The similarity measure ofeach of the D colors is accumulated at 436. After accumulating thesimilarity measure of each color in each partition of the image, theaccumulated similarity measure for the reference image is stored, at415, and the next reference image is similarly processed 410-419. Afterdetermining the similarity of each reference image to the target image,the reference images that have the highest similarity to the targetimage are displayed to the user, at 480.

[0028] The foregoing merely illustrates the principles of the invention.It will thus be appreciated that those skilled in the art will be ableto devise various arrangements that, although not explicitly describedor shown herein, embody the principles of the invention and are thuswithin its spirit and scope. For example, the equations shown at 434 and436 of FIG. 4 may be modified to provide a different weighting betweenthe effect that each factor (color distribution and color difference)has on the resultant similarity measure. For example, both the sum andthe difference between the proportions of the target and reference imageare computed in the preferred embodiment, although a similarity measurecan be determined based on either the sum or the difference, or based onother comparative measures common in the art, such as ratios and thelike, and need not expressly use proportions. Similarly, one of ordinaryskill in the art may choose not to expressly attenuate the similaritymeasure by the color difference ColDiff 332, because the colordifference can be seen to have an indirect effect on the similaritymeasure, via its use in the determination of which color is similar toanother. Additionally, although the computation of a color difference isshown expressly as a difference computation at 434, such a computationmay be effected by a table look-up or other technique common in the artto save computation time. Similarly, the particular segregation offunctions presented in this disclosure represent example structures andalternative structures that embody the principles of this inventionwould be evident to one of ordinary skill in the art.

I claim:
 1. A method for characterizing an image comprising:partitioning the image into a plurality of partitions, each partitionincluding a plurality of pixels, each pixel having a color, anddetermining a frequency of occurrence of each color of the plurality ofpixels within each partition.
 2. The method of claim 1 , furtherincluding quantizing an encoded color of each pixel to provide the colorof each pixel.
 3. The method of claim 2 , further including identifyinga plurality of populous colors, based on the frequency of occurrence ofeach color, and characterizing the image based on proportions of each ofthe plurality of populous colors in each partition.
 4. The method ofclaim 2 , wherein quantizing the encoded color includes identifying aset of color centers, and determining the color of each pixel based upona color distance between the encoded color of each pixel and each of theset of color centers.
 5. The method of claim 1 , further includingidentifying a plurality of populous colors, based on the frequency ofoccurrence of each color, and characterizing the image based onproportions of each of the plurality of populous colors in eachpartition.
 6. A method of comparing a first image to a second image,comprising partitioning the first image into a plurality of firstpartitions, each first partition including a plurality of first pixels,each first pixel having a color, determining a frequency of occurrenceof each color of the plurality of first pixels within each firstpartition, partitioning the second image into a plurality of secondpartitions, each second partition including a plurality of secondpixels, each second pixel having a color, determining a frequency ofoccurrence of each color of the plurality of second pixels within eachsecond partition comparing the frequency of occurrence of a select setof colors in each first partition with the frequency of occurrence of acorresponding select set of colors in each second partition.
 7. Themethod of claim 6 , further including quantizing an encoded color ofeach pixel of the plurality of first pixels to provide the color of eachpixel of the plurality of first pixels.
 8. The method of claim 7 ,further including identifying a plurality of first populous colors,based on the frequency of occurrence of each color of the plurality offirst pixels, and identifying a plurality of second populous colors,based on the frequency of occurrence of each color of the plurality ofsecond pixels; and wherein the select set of colors in each firstpartition corresponds to the plurality of first populous colors, and thecorresponding set of colors in each second partition is based upon acolor difference between each of the plurality of second populous colorsand the plurality of first populous colors.
 9. The method of claim 7 ,wherein quantizing the encoded color includes identifying a set of colorcenters, and determining the color of each pixel based upon a colordistance between the encoded color of each pixel and each of the set ofcolor centers.
 10. The method of claim 6 , further including identifyinga plurality of first populous colors, based on the frequency ofoccurrence of each color of the plurality of first pixels, andidentifying a plurality of second populous colors, based on thefrequency of occurrence of each color of the plurality of second pixels;and wherein the select set of colors in each first partition correspondsto the plurality of first populous colors, and the corresponding set ofcolors in each second partition is based upon a color difference betweeneach of the plurality of second populous colors and the plurality offirst populous colors.
 11. A system for characterizing an imagecomprising: a partitioner that is configured to partition the image intoa plurality of partitions, each partition including a plurality ofpixels, each pixel having a color, and an accumulator that is configuredto determine a frequency of occurrence of each color of the plurality ofpixels within each partition.
 12. The system of claim 11 , furtherincluding a quantizer that is configured to quantize an encoded color ofeach pixel to provide the color of each pixel.
 13. The system of claim12 , wherein the system is configured to characterize the image based onthe frequency of occurrence of each of a plurality of populous colors ineach partition.
 14. The system of claim 12 , wherein the quantizer isconfigured to quantize the encoded color based upon a color distancebetween the encoded color of each pixel and each of a set of colorcenters.
 15. The system of claim 11 , wherein the system is configuredto characterize the image based on the frequency of occurrence of eachof a plurality of populous colors in each partition.
 16. A system forcomparing a first image to a second image, the system comprising: asimilar color determinator that is configured to determine a mappingbetween a first set of colors of pixels of the first image and a secondset of colors of pixels of the second image, based on a color distancebetween each of the first set of colors and each of the second set ofcolors, the mapping thereby providing a corresponding color in thesecond set of colors for each color in the first set of colors, and asimilarity determinator that is configured to determine an imagesimilarity measure based on a comparison of a frequency of occurrence ofpixels of each of the first set of colors and a frequency of occurrenceof pixels of each of the corresponding colors in the second set ofcolors.
 17. The system of claim 16 , wherein the first image ispartitioned into a plurality of first partitions, the second image ispartitioned into a plurality of second partitions, the similar colordeterminator is configured to determine the mapping between the firstand second sets of colors of pixels for each partition of the pluralityof first and second partitions, and the similarity determinator isconfigured to determine a plurality of similarity measures based on thecomparison of the frequencies of occurrence of pixels of each of thefirst and second set of colors for each partition of the plurality offirst and second partitions, and further includes an accumulator that isconfigured to provide the image similarity measure based on a compositeof the plurality of similarity measures corresponding to each partitionof the first and second partitions.
 18. The system of claim 17 , whereinthe similarity determinator is further configured to determine thesimilarity measure based upon the color distances between each of thefirst set of colors and the corresponding color in the second set ofcolors.
 19. The system of claim 16 , wherein the first set of colors ofthe pixels of the first image is based on a quantization of encodedcolors of the pixels of the first image.
 20. The system of claim 17 ,wherein the quantization of encoded colors is based on a color distancebetween the encoded color of each pixel and each of a set of colorcenters.